package com.imu.purse.modules.app.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.imu.core.base.BaseEntity;

/**
 * 用户Token
 * @author sunhw
 * @email sunhongwei@gmail.com
 * @date 2017-03-23 15:22:07
 */
@Data
@Table(name = "imu_user_token")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
public class TokenEntity extends BaseEntity 
{
	private static final long serialVersionUID = 1L;

	/**
	 * 用户ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="user_id")
	private Long userId;

	@Column(name="token")
	private String token;
	
	/**
	 * 过期时间
	 */
	@Column(name="expire_time")
	private Date expireTime;
	
	/**
	 * 更新时间
	 */
	@Column(name="update_time")
	private Date updateTime;

	/**
	 * 设置：用户ID
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	/**
	 * 获取：用户ID
	 */
	public Long getUserId() {
		return userId;
	}
	/**
	 * 设置：token
	 */
	public void setToken(String token) {
		this.token = token;
	}
	/**
	 * 获取：token
	 */
	public String getToken() {
		return token;
	}
	/**
	 * 设置：过期时间
	 */
	public void setExpireTime(Date expireTime) {
		this.expireTime = expireTime;
	}
	/**
	 * 获取：过期时间
	 */
	public Date getExpireTime() {
		return expireTime;
	}
	/**
	 * 设置：更新时间
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	/**
	 * 获取：更新时间
	 */
	public Date getUpdateTime() {
		return updateTime;
	}
}
